# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=solid
pkgver=6.1.1
pkgrel=0
pkgdesc="Hardware integration and detection"
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="qt6-qtdeclarative-dev"
makedepends="$depends_dev
	bison
	doxygen
	eudev-dev
	extra-cmake-modules
	flex-dev
	qt6-qttools-dev
	samurai
	udisks2-dev
	upower-dev
	"
subpackages="$pkgname-dev $pkgname-libs $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/solid.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/solid-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	# solidmttest is broken
	ctest --test-dir build --output-on-failure -E "solidmttest"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d30e6426e418791f0cab72fb5ab54ed2d8ff98212959fee5a4e661db2165a0b920f3a1c36ebc518b4659b36640429e31925200946a45999d874424f4756158d5  solid-6.1.1.tar.xz
"
